using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VWTSUB
    {
        public DataRow Convert2WTSUB(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryWTSUB(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["WTUMANDANT"] = " ".PadRight(2 ); 
         dwReturn["WTUNUMB"] = " ".PadRight(8 ); 
         dwReturn["WTUAENZL"] = " ".PadRight(0 ); 
         dwReturn["WTUAENB"] = " ".PadRight(8 ); 
         dwReturn["WTUAEND"] = " ".PadRight(0 ); 
         dwReturn["WTUNEUB"] = " ".PadRight(8 ); 
         dwReturn["WTUNEUD"] = " ".PadRight(0 ); 
         dwReturn["WTUBEZ"] = " ".PadRight(50 ); 
         dwReturn["WTUSTA"] = " ".PadRight(1 ); 
         dwReturn["WTUPRIO"] = " ".PadRight(2 ); 
         dwReturn["WTUVALFRM"] = " ".PadRight(0 ); 
         dwReturn["WTUVALUNTL"] = " ".PadRight(0 ); 
         dwReturn["WTUEND"] = " ".PadRight(1 ); 
         dwReturn["WTUFLEV"] = " ".PadRight(1 ); 
         dwReturn["WTUFART"] = " ".PadRight(20 ); 
         dwReturn["WTUFVAR"] = " ".PadRight(3 ); 
         dwReturn["WTUFFARBE"] = " ".PadRight(10 ); 
         dwReturn["WTUFBESCHICH"] = " ".PadRight(10 ); 
         dwReturn["WTUFZUST"] = " ".PadRight(4 ); 
         dwReturn["WTUTLEV"] = " ".PadRight(1 ); 
         dwReturn["WTUTART"] = " ".PadRight(20 ); 
         dwReturn["WTUTVAR"] = " ".PadRight(3 ); 
         dwReturn["WTUTFARBE"] = " ".PadRight(10 ); 
         dwReturn["WTUTBESCHICH"] = " ".PadRight(10 ); 
         dwReturn["WTUTZUST"] = " ".PadRight(4 ); 
         dwReturn["WTUTFACTOR"] = " ".PadRight(0 ); 
         dwReturn["WTUDENSITY"] = " ".PadRight(1 ); 
         dwReturn["WTUPROLEV"] = " ".PadRight(1 ); 
         dwReturn["WTUPART"] = " ".PadRight(20 ); 
         dwReturn["WTUPVAR"] = " ".PadRight(3 ); 
         dwReturn["WTUPFARBE"] = " ".PadRight(10 ); 
         dwReturn["WTUPBESCHICH"] = " ".PadRight(10 ); 
         dwReturn["WTUPZUST"] = " ".PadRight(4 ); 
         dwReturn["WTUWERK"] = " ".PadRight(3 ); 
         dwReturn["WTUABT"] = " ".PadRight(3 ); 
         dwReturn["WTUAKUNDNR"] = " ".PadRight(8 ); 
         dwReturn["WTUAKUNDADR"] = " ".PadRight(8 ); 
         dwReturn["WTULKUNDNR"] = " ".PadRight(8 ); 
         dwReturn["WTULKUNDADR"] = " ".PadRight(8 ); 
         dwReturn["WTUPROJNR"] = " ".PadRight(24 ); 
         dwReturn["WTUMDORD"] = " ".PadRight(1 ); 
         dwReturn["WTUWEFT"] = " ".PadRight(1 ); 
         dwReturn["WTUAUFART1"] = " ".PadRight(2 ); 
         dwReturn["WTUAUFART2"] = " ".PadRight(2 ); 
         dwReturn["WTUAUFART3"] = " ".PadRight(2 ); 
         dwReturn["WTUPOSTYP1"] = " ".PadRight(3 ); 
         dwReturn["WTUPOSTYP2"] = " ".PadRight(3 ); 
         dwReturn["WTUPOSTYP3"] = " ".PadRight(3 ); 
         dwReturn["WTUPOSTYP4"] = " ".PadRight(3 ); 
         dwReturn["WTUPOSTYP5"] = " ".PadRight(3 ); 
         dwReturn["WTUPOSTYP6"] = " ".PadRight(3 ); 
         dwReturn["WTUFARBGRP1"] = " ".PadRight(1 ); 
         dwReturn["WTUFARBGRP2"] = " ".PadRight(1 ); 
         dwReturn["WTUFARBGRP3"] = " ".PadRight(1 ); 
         dwReturn["WTUAUSART"] = " ".PadRight(4 ); 
         dwReturn["WTUBAUMKZ"] = " ".PadRight(1 ); 
         dwReturn["WTUVERWEN"] = " ".PadRight(1 ); 
         dwReturn["WTURGRQMV"] = " ".PadRight(0 ); 
         dwReturn["WTURGRQMB"] = " ".PadRight(0 ); 
         dwReturn["WTURWBRTV"] = " ".PadRight(0 ); 
         dwReturn["WTURWBRTB"] = " ".PadRight(0 ); 
         dwReturn["WTUPROGRPO"] = " ".PadRight(3 ); 
         dwReturn["WTUARTGRPO"] = " ".PadRight(3 ); 
         dwReturn["WTUMATKLO"] = " ".PadRight(9 ); 
         dwReturn["WTURKL"] = " ".PadRight(4 ); 
         dwReturn["WTUPRODH"] = " ".PadRight(18 ); 
         dwReturn["WTUAKTION"] = " ".PadRight(1 ); 
         dwReturn["WTUFILLER"] = " ".PadRight(102 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapWTSUB(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveWTSUB(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryWTSUB(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapWTSUB(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertWTSUB(dwLocal, ITXDBVERSION);
            }
            UpdateWTSUB(dwLocal);
        }
        public void InsertWTSUB(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO WTSUB(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryWTSUB(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM WTSUB WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM WTSUB  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "WTSUB";
            Return = Result;
            return Return;
        }
        public void DeleteWTSUB(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM WTSUB   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateWTSUB(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE WTSUB SET "
                    +"WTUMANDANT= :WTUMANDANT,"
                    +"WTUNUMB= :WTUNUMB,"
                    +"WTUAENZL= :WTUAENZL,"
                    +"WTUAENB= :WTUAENB,"
                    +"WTUAEND= :WTUAEND,"
                    +"WTUNEUB= :WTUNEUB,"
                    +"WTUNEUD= :WTUNEUD,"
                    +"WTUBEZ= :WTUBEZ,"
                    +"WTUSTA= :WTUSTA,"
                    +"WTUPRIO= :WTUPRIO,"
                    +"WTUVALFRM= :WTUVALFRM,"
                    +"WTUVALUNTL= :WTUVALUNTL,"
                    +"WTUEND= :WTUEND,"
                    +"WTUFLEV= :WTUFLEV,"
                    +"WTUFART= :WTUFART,"
                    +"WTUFVAR= :WTUFVAR,"
                    +"WTUFFARBE= :WTUFFARBE,"
                    +"WTUFBESCHICH= :WTUFBESCHICH,"
                    +"WTUFZUST= :WTUFZUST,"
                    +"WTUTLEV= :WTUTLEV,"
                    +"WTUTART= :WTUTART,"
                    +"WTUTVAR= :WTUTVAR,"
                    +"WTUTFARBE= :WTUTFARBE,"
                    +"WTUTBESCHICH= :WTUTBESCHICH,"
                    +"WTUTZUST= :WTUTZUST,"
                    +"WTUTFACTOR= :WTUTFACTOR,"
                    +"WTUDENSITY= :WTUDENSITY,"
                    +"WTUPROLEV= :WTUPROLEV,"
                    +"WTUPART= :WTUPART,"
                    +"WTUPVAR= :WTUPVAR,"
                    +"WTUPFARBE= :WTUPFARBE,"
                    +"WTUPBESCHICH= :WTUPBESCHICH,"
                    +"WTUPZUST= :WTUPZUST,"
                    +"WTUWERK= :WTUWERK,"
                    +"WTUABT= :WTUABT,"
                    +"WTUAKUNDNR= :WTUAKUNDNR,"
                    +"WTUAKUNDADR= :WTUAKUNDADR,"
                    +"WTULKUNDNR= :WTULKUNDNR,"
                    +"WTULKUNDADR= :WTULKUNDADR,"
                    +"WTUPROJNR= :WTUPROJNR,"
                    +"WTUMDORD= :WTUMDORD,"
                    +"WTUWEFT= :WTUWEFT,"
                    +"WTUAUFART1= :WTUAUFART1,"
                    +"WTUAUFART2= :WTUAUFART2,"
                    +"WTUAUFART3= :WTUAUFART3,"
                    +"WTUPOSTYP1= :WTUPOSTYP1,"
                    +"WTUPOSTYP2= :WTUPOSTYP2,"
                    +"WTUPOSTYP3= :WTUPOSTYP3,"
                    +"WTUPOSTYP4= :WTUPOSTYP4,"
                    +"WTUPOSTYP5= :WTUPOSTYP5,"
                    +"WTUPOSTYP6= :WTUPOSTYP6,"
                    +"WTUFARBGRP1= :WTUFARBGRP1,"
                    +"WTUFARBGRP2= :WTUFARBGRP2,"
                    +"WTUFARBGRP3= :WTUFARBGRP3,"
                    +"WTUAUSART= :WTUAUSART,"
                    +"WTUBAUMKZ= :WTUBAUMKZ,"
                    +"WTUVERWEN= :WTUVERWEN,"
                    +"WTURGRQMV= :WTURGRQMV,"
                    +"WTURGRQMB= :WTURGRQMB,"
                    +"WTURWBRTV= :WTURWBRTV,"
                    +"WTURWBRTB= :WTURWBRTB,"
                    +"WTUPROGRPO= :WTUPROGRPO,"
                    +"WTUARTGRPO= :WTUARTGRPO,"
                    +"WTUMATKLO= :WTUMATKLO,"
                    +"WTURKL= :WTURKL,"
                    +"WTUPRODH= :WTUPRODH,"
                    +"WTUAKTION= :WTUAKTION,"
                    +"WTUFILLER= :WTUFILLER,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("WTUMANDANT", OracleType.NVarChar).Value = dwData["WTUMANDANT"].ToString(); 
          or1.Parameters.Add("WTUNUMB", OracleType.NVarChar).Value = dwData["WTUNUMB"].ToString(); 
          or1.Parameters.Add("WTUAENZL", OracleType.NVarChar).Value = dwData["WTUAENZL"].ToString(); 
          or1.Parameters.Add("WTUAENB", OracleType.NVarChar).Value = dwData["WTUAENB"].ToString(); 
          or1.Parameters.Add("WTUAEND", OracleType.NVarChar).Value = dwData["WTUAEND"].ToString(); 
          or1.Parameters.Add("WTUNEUB", OracleType.NVarChar).Value = dwData["WTUNEUB"].ToString(); 
          or1.Parameters.Add("WTUNEUD", OracleType.NVarChar).Value = dwData["WTUNEUD"].ToString(); 
          or1.Parameters.Add("WTUBEZ", OracleType.NVarChar).Value = dwData["WTUBEZ"].ToString(); 
          or1.Parameters.Add("WTUSTA", OracleType.NVarChar).Value = dwData["WTUSTA"].ToString(); 
          or1.Parameters.Add("WTUPRIO", OracleType.NVarChar).Value = dwData["WTUPRIO"].ToString(); 
          or1.Parameters.Add("WTUVALFRM", OracleType.NVarChar).Value = dwData["WTUVALFRM"].ToString(); 
          or1.Parameters.Add("WTUVALUNTL", OracleType.NVarChar).Value = dwData["WTUVALUNTL"].ToString(); 
          or1.Parameters.Add("WTUEND", OracleType.NVarChar).Value = dwData["WTUEND"].ToString(); 
          or1.Parameters.Add("WTUFLEV", OracleType.NVarChar).Value = dwData["WTUFLEV"].ToString(); 
          or1.Parameters.Add("WTUFART", OracleType.NVarChar).Value = dwData["WTUFART"].ToString(); 
          or1.Parameters.Add("WTUFVAR", OracleType.NVarChar).Value = dwData["WTUFVAR"].ToString(); 
          or1.Parameters.Add("WTUFFARBE", OracleType.NVarChar).Value = dwData["WTUFFARBE"].ToString(); 
          or1.Parameters.Add("WTUFBESCHICH", OracleType.NVarChar).Value = dwData["WTUFBESCHICH"].ToString(); 
          or1.Parameters.Add("WTUFZUST", OracleType.NVarChar).Value = dwData["WTUFZUST"].ToString(); 
          or1.Parameters.Add("WTUTLEV", OracleType.NVarChar).Value = dwData["WTUTLEV"].ToString(); 
          or1.Parameters.Add("WTUTART", OracleType.NVarChar).Value = dwData["WTUTART"].ToString(); 
          or1.Parameters.Add("WTUTVAR", OracleType.NVarChar).Value = dwData["WTUTVAR"].ToString(); 
          or1.Parameters.Add("WTUTFARBE", OracleType.NVarChar).Value = dwData["WTUTFARBE"].ToString(); 
          or1.Parameters.Add("WTUTBESCHICH", OracleType.NVarChar).Value = dwData["WTUTBESCHICH"].ToString(); 
          or1.Parameters.Add("WTUTZUST", OracleType.NVarChar).Value = dwData["WTUTZUST"].ToString(); 
          or1.Parameters.Add("WTUTFACTOR", OracleType.NVarChar).Value = dwData["WTUTFACTOR"].ToString(); 
          or1.Parameters.Add("WTUDENSITY", OracleType.NVarChar).Value = dwData["WTUDENSITY"].ToString(); 
          or1.Parameters.Add("WTUPROLEV", OracleType.NVarChar).Value = dwData["WTUPROLEV"].ToString(); 
          or1.Parameters.Add("WTUPART", OracleType.NVarChar).Value = dwData["WTUPART"].ToString(); 
          or1.Parameters.Add("WTUPVAR", OracleType.NVarChar).Value = dwData["WTUPVAR"].ToString(); 
          or1.Parameters.Add("WTUPFARBE", OracleType.NVarChar).Value = dwData["WTUPFARBE"].ToString(); 
          or1.Parameters.Add("WTUPBESCHICH", OracleType.NVarChar).Value = dwData["WTUPBESCHICH"].ToString(); 
          or1.Parameters.Add("WTUPZUST", OracleType.NVarChar).Value = dwData["WTUPZUST"].ToString(); 
          or1.Parameters.Add("WTUWERK", OracleType.NVarChar).Value = dwData["WTUWERK"].ToString(); 
          or1.Parameters.Add("WTUABT", OracleType.NVarChar).Value = dwData["WTUABT"].ToString(); 
          or1.Parameters.Add("WTUAKUNDNR", OracleType.NVarChar).Value = dwData["WTUAKUNDNR"].ToString(); 
          or1.Parameters.Add("WTUAKUNDADR", OracleType.NVarChar).Value = dwData["WTUAKUNDADR"].ToString(); 
          or1.Parameters.Add("WTULKUNDNR", OracleType.NVarChar).Value = dwData["WTULKUNDNR"].ToString(); 
          or1.Parameters.Add("WTULKUNDADR", OracleType.NVarChar).Value = dwData["WTULKUNDADR"].ToString(); 
          or1.Parameters.Add("WTUPROJNR", OracleType.NVarChar).Value = dwData["WTUPROJNR"].ToString(); 
          or1.Parameters.Add("WTUMDORD", OracleType.NVarChar).Value = dwData["WTUMDORD"].ToString(); 
          or1.Parameters.Add("WTUWEFT", OracleType.NVarChar).Value = dwData["WTUWEFT"].ToString(); 
          or1.Parameters.Add("WTUAUFART1", OracleType.NVarChar).Value = dwData["WTUAUFART1"].ToString(); 
          or1.Parameters.Add("WTUAUFART2", OracleType.NVarChar).Value = dwData["WTUAUFART2"].ToString(); 
          or1.Parameters.Add("WTUAUFART3", OracleType.NVarChar).Value = dwData["WTUAUFART3"].ToString(); 
          or1.Parameters.Add("WTUPOSTYP1", OracleType.NVarChar).Value = dwData["WTUPOSTYP1"].ToString(); 
          or1.Parameters.Add("WTUPOSTYP2", OracleType.NVarChar).Value = dwData["WTUPOSTYP2"].ToString(); 
          or1.Parameters.Add("WTUPOSTYP3", OracleType.NVarChar).Value = dwData["WTUPOSTYP3"].ToString(); 
          or1.Parameters.Add("WTUPOSTYP4", OracleType.NVarChar).Value = dwData["WTUPOSTYP4"].ToString(); 
          or1.Parameters.Add("WTUPOSTYP5", OracleType.NVarChar).Value = dwData["WTUPOSTYP5"].ToString(); 
          or1.Parameters.Add("WTUPOSTYP6", OracleType.NVarChar).Value = dwData["WTUPOSTYP6"].ToString(); 
          or1.Parameters.Add("WTUFARBGRP1", OracleType.NVarChar).Value = dwData["WTUFARBGRP1"].ToString(); 
          or1.Parameters.Add("WTUFARBGRP2", OracleType.NVarChar).Value = dwData["WTUFARBGRP2"].ToString(); 
          or1.Parameters.Add("WTUFARBGRP3", OracleType.NVarChar).Value = dwData["WTUFARBGRP3"].ToString(); 
          or1.Parameters.Add("WTUAUSART", OracleType.NVarChar).Value = dwData["WTUAUSART"].ToString(); 
          or1.Parameters.Add("WTUBAUMKZ", OracleType.NVarChar).Value = dwData["WTUBAUMKZ"].ToString(); 
          or1.Parameters.Add("WTUVERWEN", OracleType.NVarChar).Value = dwData["WTUVERWEN"].ToString(); 
          or1.Parameters.Add("WTURGRQMV", OracleType.NVarChar).Value = dwData["WTURGRQMV"].ToString(); 
          or1.Parameters.Add("WTURGRQMB", OracleType.NVarChar).Value = dwData["WTURGRQMB"].ToString(); 
          or1.Parameters.Add("WTURWBRTV", OracleType.NVarChar).Value = dwData["WTURWBRTV"].ToString(); 
          or1.Parameters.Add("WTURWBRTB", OracleType.NVarChar).Value = dwData["WTURWBRTB"].ToString(); 
          or1.Parameters.Add("WTUPROGRPO", OracleType.NVarChar).Value = dwData["WTUPROGRPO"].ToString(); 
          or1.Parameters.Add("WTUARTGRPO", OracleType.NVarChar).Value = dwData["WTUARTGRPO"].ToString(); 
          or1.Parameters.Add("WTUMATKLO", OracleType.NVarChar).Value = dwData["WTUMATKLO"].ToString(); 
          or1.Parameters.Add("WTURKL", OracleType.NVarChar).Value = dwData["WTURKL"].ToString(); 
          or1.Parameters.Add("WTUPRODH", OracleType.NVarChar).Value = dwData["WTUPRODH"].ToString(); 
          or1.Parameters.Add("WTUAKTION", OracleType.NVarChar).Value = dwData["WTUAKTION"].ToString(); 
          or1.Parameters.Add("WTUFILLER", OracleType.NVarChar).Value = dwData["WTUFILLER"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
